Skip to content

fix: prevent panel swipe from capturing horizontal scroll in <pre> code blocks - #126

Merged
therealsama merged 1 commit into
mainfrom
fix/mobile-pre-horizontal-scroll
May 29, 2026
Merged

therealsama merged 1 commit into
mainfrom
fix/mobile-pre-horizontal-scroll

Conversation

@therealsama

Copy link
Copy Markdown
Collaborator
  • Add touch target detection in useSwipeScroll to yield horizontal gestures to scrollable <pre> elements and [data-swipe-ignore] regions
  • Add overscroll-behavior-x: contain to .comment-content pre in CSS
  • Add tabindex=0 to <pre> elements via sanitizer for keyboard accessibility
  • Add unit tests for scrollable element bail logic
  • Add e2e test for code block horizontal scroll on mobile

@therealsama
therealsama requested a review from kplachkov as a code owner May 29, 2026 21:38
…de blocks

- Add touch target detection in useSwipeScroll to yield horizontal gestures
  to scrollable <pre> elements and [data-swipe-ignore] regions
- Add overscroll-behavior-x: contain to .comment-content pre in CSS
- Add tabindex=0 to <pre> elements via sanitizer for keyboard accessibility
- Add unit tests for scrollable element bail logic
- Add e2e test for code block horizontal scroll on mobile
@therealsama
therealsama force-pushed the fix/mobile-pre-horizontal-scroll branch from d86d7a2 to 7318b32 Compare May 29, 2026 21:51
@therealsama
therealsama enabled auto-merge May 29, 2026 22:06
@therealsama
therealsama merged commit e678475 into main May 29, 2026
4 checks passed
@therealsama
therealsama deleted the fix/mobile-pre-horizontal-scroll branch May 29, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants